import {findAllTag} from "@/api";

const state = () => ({
    tags: []
})

const getters = {}

const actions = {
    async getAllTags ({ commit }) {
        const result = await findAllTag();
        if (result.code==10000){
            commit('GETALLTAGS',result.data)
        }
    }
}

const mutations = {
    GETALLTAGS (state, tags) {
        state.tags = tags
    },
}

export default {
    state,
    getters,
    actions,
    mutations
}
